import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

class GridViewPage extends StatelessWidget {
  final SystemUiOverlayStyle _style =
      SystemUiOverlayStyle(statusBarColor: Colors.transparent);

  @override
  Widget build(BuildContext context) {
    SystemChrome.setSystemUIOverlayStyle(_style);
    // TODO: implement build
    return MaterialApp(
      home: GridViewWidget(),
      theme: ThemeData(primarySwatch: Colors.yellow),
    );
  }
}

class GridViewWidget extends StatefulWidget {
  @override
  State<StatefulWidget> createState() {
    // TODO: implement createState
    return _GridViewPage();
  }
}

class _GridViewPage extends State<StatefulWidget> {
  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return Scaffold(
      appBar: AppBar(
        title: Text("GridView Page"),
      ),
      body: GridView(
        gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
            crossAxisCount: 3, childAspectRatio: 1),
        children: <Widget>[
          Text("1"),Text("2"),Text("3"),Text("4"),Text("5"),Text("6"),Text("7"),Text("8"),Text("9"),
        ],
      ),
    );
  }
}
